﻿ 
{$header}<div id="main" class="main" >
    <div class="content">
  <h3 class="heading">编辑客户询单 [ <a href="__URL__">返回列表</a> ]</h3>
<div id="result" class="result none"></div>
<form class="form-horizontal well" method='post' id="form1" name="form1" action="__URL__/update/">
<table cellpadding=3 cellspacing=3 >
<tr>
    <td>询单编号：</td><td>{$vo.mano}  <span class="offset2"></span> </td>
</tr>
<tr>
    <td>采购询价</td><td>{$vo.id|getAskLink}</a> </td>
</tr>
<tr>
    <td class="tRight" width="150px">客户：</td>
	<td class="tLeft" >{$vo.customer_id|getModelName='Customer'}
            询单时间：<input type="text" class="span2" name="create_time" value="{$vo.create_time|toDate}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"> 
        </td>
</tr>
<tr>
    <td class="tRight" >选择已有产品：</td>
    <td class="tLeft" >
            <div class="input-append">
                <input id="q" name="q" class="input-xlarge search-query" placeholder="搜索" value="{$vo.product_id|getModelName='Product'}">
                <input id="hz" name="product_id" type="hidden" value="{$vo.product_id}"></input>
                <button class="btn" type="button" onclick="filter()"><i class="icon-search"></i>搜索</button>
            </div>
            <img src="__PUBLIC__/Uploads/product/{$vo.product_id|getCas}.jpg">
        </td>
</tr>
<tr>
    <td>数量：</td>
    <td><input type="text" name="number" value="{$vo.number}" class="input-xxlarge">
    </td>
</tr>
<tr>
    <td>质量要求：</td>
    <td><input type="text" name="quality" value="{$vo.quality}" class="input-xxlarge"></td>
</tr>
<tr>
    <td>要求交货期：</td>
    <td><input type="text" class="span2" name="delivery_date" value="{$vo.delivery_date|toDate='Y-m-d'}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"></td>
</tr>

<tr>
	<td class="tRight">询单要求：</td>
        <td class="tLeft"><textarea class="span12" name="remark" rows="3">{$vo.remark}</textarea>
        </td>
</tr>
<tr>
    <td class="tRight">询单状态：</td>
    <td class="tLeft">{$vo.status|getConfigVal='askStatus'}
        <if condition="$vo['status'] gt 3">
            <select name="status">
                <option value='5'>已经报价</option>
                <option value='6'>客户还价-待更新</option>
                <option value='9'>还价处理完成</option>
            </select>
        </if>
        </td>
</tr>
<tr>
    <td class="tRight" >经办人：</td>
    <td class="tLeft" >{:modList('User')}</td>
</tr>
<tr>
	<td></td>
	<td class="center" width="300">
        <input type="hidden" value="{$vo.id}" name="id">
	<a  href="javascript:void(0)" class="btn btn-primary" onclick="remind()"><i class="icon-ok icon-white"></i> 保存</a>
	<button type="reset" onclick="javascript:history.back()" class="btn btn-primary offset1"><i class="icon-arrow-left icon-white"></i> 返回</button>
	</td>
</tr>
</table>
</form>
</div>
</div>
<include file="Public:footer" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Js/easyui/themes/default/easyui.css">
<script type="text/javascript" src="__PUBLIC__/Js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/filter-product.js"></script>
<load href="__PUBLIC__/Js/My97DatePicker/WdatePicker.js" />
<script type="text/javascript">
    function filterCustomer(){ 
        if ($('#q').val() != "") {
            window.open(APP+'/Customer/search/keywords/'+$('#cq').val()+'?form=form1&field=cq','selected','directorys=no,toolbar=no,status=no,menubar=no,resizable=yes,width=1000,height=800,top=100,left=120,scrollbars=yes');
        }else
            window.open(APP+'/Customer/search?form=form1&field=cq','selected','directorys=no,toolbar=no,status=no,menubar=no,resizable=yes,width=1000,height=800,top=100,left=120,scrollbars=yes');
    }

    function remind () {
        if (window.confirm('确实要修改吗？'))
        {
            $('#form1').submit();
        }
    }
</script>
